package ThreadCreat;

import ThreadCreat.ThreadExtendsThread;
import ThreadCreat.ThreadExtendsThread02;

/**
 * ClassName ThreadCreat.Thread03
 * Description TODO
 * Author Hexiao
 * Date 2018/8/24 10:19
 * Version 1.0
 **/
public class Thread03 {
    public void test(){
        System.out.println("ThreadCreat.Thread03...test");
        Thread t=Thread.currentThread();//获取当前正在调用方法的线程对象
        System.out.println(t.getName()+" "+t.getId());
    }
    public static void main(String[] args){
//        线程随机运行
       ThreadExtendsThread t1=new ThreadExtendsThread();
       ThreadExtendsThread02 t2=new ThreadExtendsThread02();
       t1.start();
       t2.start();

    }
    }